home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
ab20
/
ab20_archive
/
text
/
cmanual.lzh
/
ACM2.lzh
/
HintsAndTips
/
Example1.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-01-27
|
1KB
|
45 lines
/* Example 1 */
/* This example tell you if you have an American (NTSC) or */
/* European (PAL) system. */
/* Declares commonly used data types, such as UWORD etc: */
#include <exec/types.h>
/* This header file declares the GfxBase structure: */
#include <graphics/gfxbase.h>
/* Pointer to the GfxBase structure. NOTE! This pointer must */
/* allways be called "GfxBase"! */
struct GfxBase *GfxBase;
main()
{
int loop;
/* Open the Graphics Library: (any version) */
GfxBase = (struct GfxBase *)
OpenLibrary( "graphics.library", 0 );
if( !GfxBase )
exit(); /* ERROR! Could not open the Graphics Library! */
if( GfxBase->DisplayFlags & NTSC )
printf( "You have an American (NTSC) Amiga.\n" );
if( GfxBase->DisplayFlags & PAL )
printf( "You have an European (PAL) Amiga.\n" );
/* Close the Graphics Library: */
CloseLibrary( GfxBase );
/* Wait for a while: */
for( loop = 0; loop < 500000; loop++ )
;
}